﻿using ServiceStack.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace UserSessionService.WebApi.DataLayer
{
    public class RedisRepository : IUserSessionRepository
    {
        RedisClient redisClient;
        string redisServer = "localhost";
        int redisPort = 6379;
        
        public RedisRepository()
        {
            redisServer = Helper.GetAppSetting("RedisServerName");
            redisPort = int.Parse(Helper.GetAppSetting("RedisServerPort"));
            redisClient = new RedisClient(redisServer, redisPort);
        }

        public Models.UserSession GetUserSession(string encodedUserId)
        {
            throw new NotImplementedException();
        }

        public List<string> GetViewedItems(string encodedUserId, int count)
        {
            throw new NotImplementedException();
        }

        public void AddViewedItem(string encodedUserId, string productId)
        {
            throw new NotImplementedException();
        }

        public void DeleteViewedItems()
        {
            throw new NotImplementedException();
        }
    }
}